<?php

class TagCloud  
{
	
	private static $tagCache;

	public static  function getTags($maxTags)
	{
		$criteria=new CDbCriteria(array(
				'limit' => $maxTags
		));
		$tags=Tag::model()->findAll($criteria);
		$result = array();
		foreach($tags as $tag)
		{
			$result[] = array('text'=>$tag->name, 'url'=> $tag->name, 'title'=> $tag->name, 'weight'=> $tag->count);
		}
		return $result;
	}
	
	
	
}